﻿<%@ Page Language="C#" MasterPageFile="~/Template.master" AutoEventWireup="true" CodeFile="Accounts.aspx.cs" Inherits="Accounts" Title="Ghasam Accounts" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <div>
        <h3>حساب های داخلی</h3>
    </div>
     <hr />
     <div>
        <asp:GridView ID="gvAccounts" runat="server" AutoGenerateColumns="False" 
             DataKeyNames="ID" onrowdeleting="gvAccounts_RowDeleting" 
             onselectedindexchanging="gvAccounts_SelectedIndexChanging" 
             AllowSorting="True" onsorting="gvAccounts_Sorting">
            <Columns>
                <asp:BoundField DataField="ID" HeaderText="ID" Visible="False" InsertVisible="False" ReadOnly="True"
                    SortExpression="Id" />
                
                <asp:BoundField DataField="Name" HeaderText="نام حساب" SortExpression="Name" />
                
                <asp:BoundField DataField="Description" HeaderText="توضیحات" SortExpression="Description" />
                                
                <asp:TemplateField>
                    <ItemTemplate>
                        <asp:LinkButton ID="EditAccounts" runat="server" CausesValidation="False" CommandName="Select">
                                <img src="App_Themes/<%=Page.Theme %>/images/edit.gif" alt="" style="border:0;" />
                        </asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
                
                <asp:TemplateField>
                    <ItemTemplate>
                        <asp:LinkButton ID="DeleteAccounts" runat="server" CausesValidation="False" CommandName="Delete">
                                <img src="App_Themes/<%=Page.Theme %>/images/delete.gif" alt="" style="border:0;" />
                        </asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
         &nbsp;
     </div>
     
     <br />
     <br />
     
     <div>
        <h3>
            ایجاد و تغییر حساب    
        </h3>
    </div>
    
    <br />
    
    <div>
        <asp:TextBox ID="txtAccountId" runat="server" Visible="false" />
        <br />
        نام حساب
        <asp:TextBox ID="txtAccountName" runat="server" />
        <asp:RequiredFieldValidator ID="rfvAccountName" ControlToValidate="txtAccountName" ErrorMessage="*" runat="server" />
        
        <br />
        <br />
        توضیحات
        <asp:TextBox ID="txtDescription" Width="300" runat="server" />
        <asp:Button ID="btnCreate" Text="ذخیره" runat="server" OnClick="btnCreate_Click" />
    </div>
    
     
</asp:Content>

